.loader {
    height         : 80vh;
    position       : relative;
    display        : flex;
    align-items    : center;
    justify-content: center;
}

.loader span {
    width           : 20px;
    height          : 20px;
    margin          : 0 10px;
    border-radius   : 50%;
    background-color: #eee;
    /* 设置动画 */
    animation       : animate 0.5s linear infinite;
}

.loader span:nth-child(1) {
    animation-delay: 0s;
}

.loader span:nth-child(2) {
    animation-delay: 0.1s;
}

.loader span:nth-child(3) {
    animation-delay: 0.2s;
}

.loader span:nth-child(4) {
    animation-delay: 0.3s;
}

.loader span:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes animate {
    0% {
        box-shadow: 0 0 0 rgba(0, 0, 0, .5);
        opacity   : 0;
        transform : translateX(-10px) scale(1);
    }

    50% {
        box-shadow: 0 20px 20px rgba(0, 0, 0, .5);
        opacity   : 1;
        transform : translateX(0) scale(1.2);
    }

    100% {
        box-shadow: 0 0 0 rgba(0, 0, 0, .5);
        opacity   : 0;
        transform : translateX(10px) scale(1);
    }
}